package com.zz.common.base.dto;

import com.zz.common.base.param.QueryParam;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author zl
 * @version 1.0
 */
@Data
public class PageListResultDto<T extends Serializable> extends ResultDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    public static final int DEFAULT_PAGE_SIZE = 10;
    public static final int DEFAULT_PAGE_NUM = 1;
    private int pageNum = 1;
    private int total;
    private int pageSize = 10;
    private List<T> bizList;

    public PageListResultDto() {
    }

    public PageListResultDto(int pageNum, int total, int pageSize, List<T> bizList) {
        this.pageNum = pageNum;
        this.total = total;
        this.pageSize = pageSize;
        this.bizList = bizList;
    }

    public PageListResultDto(int pageNum, int total, int pageSize, List<T> bizList, String code, String message) {
        super(code, message);
        this.pageNum = pageNum;
        this.total = total;
        this.pageSize = pageSize;
        this.bizList = bizList;
    }

    public PageListResultDto(QueryParam queryParam) {
    }
}

